import request from '@/utils/request'

export function getProductList(params) {
  return request(({
    url: '/product/list',
    method: 'get',
    params
  }))
}

export function addProduct(params) {
  return request(({
    url: '/product/add',
    method: 'post',
    data: params
  }))
}

export function deleteProduct(param) {
  return request(({
    url: '/product/remove',
    method: 'post',
    data: param
  }))
}

export function editProduct(params) {
  return request(({
    url: '/product/update',
    method: 'post',
    data: params
  }))
}
export function getTop5List() {
  return request(({
    url: '/product/getTodayOutTop5',
    method: 'get'
  }))
}

export function getProductCategory() {
  return request(({
    url: '/product/listCategory',
    method: 'get'
  })
  )
}

export function getProductValue() {
  return request(({
    url: '/product/getProductValue',
    method: 'get'
  })
  )
}

export function getProductSum() {
  return request(({
    url: '/product/getProductSum',
    method: 'get'
  })
  )
}

export function getHottestIn30Day() {
  return request(({
    url: '/product/getHottestIn30Day',
    method: 'get'
  })
  )
}

export function getCountByType() {
  return request(({
    url: '/product/getCountByType',
    method: 'get'
  })
  )
}

export function getCountByPrice() {
  return request(({
    url: '/product/getCountByPrice',
    method: 'get'
  })
  )
}

